import {NgModule} from '@angular/core'
import {RouterModule} from '@angular/router'

import {UserComponent} from "./user/user.component";
import {RoleComponent} from "./role/role.component";
import {ResourceComponent} from "./resource/resource.component";
import {ConfigComponent} from "./config/config.component";
import {LogComponent} from "./log/log.component";

const sysRouter = [
    {
        path: 'system',
        redirectTo: 'system/user',
        children: [
            {path: 'user', component: UserComponent},
            {path: 'role', component: RoleComponent},
            {path: 'resource', component: ResourceComponent},
            {path: 'config', component: ConfigComponent}
        ]
    }
];

@NgModule({
    declarations: [UserComponent, RoleComponent, ResourceComponent, ConfigComponent, LogComponent],
    imports: [RouterModule.forChild(sysRouter)]
})

export class SysModule {

}